#ifndef FLOATCONVERSION_H
#define FLOATCONVERSION_H

#include <QWidget>
#include <DLineEdit>
#include <DPushButton>

DWIDGET_USE_NAMESPACE

class FloatConversion : public QWidget
{
    Q_OBJECT

public:
    FloatConversion(QWidget *parent = nullptr);
    ~FloatConversion();

    void initUi();
    void initConnect();
    void setEditValidator();

public slots:
    void slotFloatToHex();        //浮点数转十六进制
    void slotHexToFloat();            //十六进制转浮点数

private:
    DLineEdit *m_float;
    DLineEdit *m_hex;

    DPushButton *m_floatToHex;
    DPushButton *m_hexToFloat;
};

#endif // FLOATCONVERSION_H
